package com.dnjn.happiness.survey.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dnjn.happiness.survey.domain.Question;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Amber
 * @since 2023-10-04
 */
public interface QuestionMapper extends BaseMapper<Question> {

    List<Question> querySurveyBySurveyId(@Param("dto") Question domain);

    List<Question> querySurveyQuestionBySurveyId(@Param("surveyId") Long surveyId, @Param("userId") Long userId);

    @Select("select tiku_id from svy_question where survey_id = #{surveyId}")
    List<Long> selectTikuIdBySurveyTemplateId(Long surveyId);


    List<Question> querySurveyBySurveyIdX(Long surveyId);
}
